package com.yanqu.road.entity.systemgroup.common;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;

import java.math.BigInteger;
import java.util.Objects;

@FieldTypeAnnotation(tableName = "t_c_new_system_server_week_data", desc = "每周区服数据-区服强度上报")
public class ServerWeekData extends DataObject {

    @FieldTypeAnnotation(desc = "每周", update = true, select = true)
    private int weekId;

    @FieldTypeAnnotation(desc = "系统", update = true)
    private int systemId;

    @FieldTypeAnnotation(desc = "区服id", update = true)
    private long serverId;

    @FieldTypeAnnotation(desc = "区服强度")
    private BigInteger ability = BigInteger.ZERO;

    @FieldTypeAnnotation(desc = "更新时间")
    private int updateTime;

    public int getWeekId() {
        return weekId;
    }

    public void setWeekId(int weekId) {
        if(this.weekId != weekId) {
            this.weekId = weekId;
            setUpdateOption();
        }
    }

    public int getSystemId() {
        return systemId;
    }

    public void setSystemId(int systemId) {
        if(this.systemId != systemId) {
            this.systemId = systemId;
            setUpdateOption();
        }
    }

    public long getServerId() {
        return serverId;
    }

    public void setServerId(long serverId) {
        if(this.serverId != serverId) {
            this.serverId = serverId;
            setUpdateOption();
        }
    }

    public BigInteger getAbility() {
        return ability;
    }

    public void setAbility(BigInteger ability) {
        if(!Objects.equals(this.ability, ability)) {
            this.ability = ability;
            setUpdateOption();
        }
    }

    public int getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(int updateTime) {
        if(this.updateTime != updateTime) {
            this.updateTime = updateTime;
            setUpdateOption();
        }
    }
}
